package com.sjb.cp.manager.auth.annotation;


import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import com.sjb.cp.manager.auth.StpKit;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@SaCheckPermission(type = StpKit.SPACE_TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD,ElementType.TYPE})
public @interface SaSpaceCheckPermission {

    /**
     * 需要校验的权限码
     * @return 需要校验的权限码
     * @return
     */
    @AliasFor(annotation = SaSpaceCheckPermission.class)
    String[] value() default {};


    @AliasFor(annotation = SaSpaceCheckPermission.class)
    SaMode made() default SaMode.AND;

    /**
     *
     * @return
     */
    @AliasFor(annotation = SaSpaceCheckPermission.class)
    String[] orRole() default {};

}
